package com.ganzalang.gmall.redis.controller;

import com.ganzalang.gmall.redis.service.impl.TestServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 测试redis是否整合成功
 */
@RestController
@RequestMapping("/test")
public class TestController {

    @Autowired
    private TestServiceImpl testService;

    @GetMapping("/redis")
    public String testRedis() {
        testService.testRedis();
        return "success";
    }

    @GetMapping("/read/replica")
    public String testReadFromReplica() {
        testService.readFromReplica();
        return "success";
    }



}
